package com.ymttest.database.mapping.orderrisk;

import com.ymttest.database.model.orderrisk.HighRiskSeller;
import com.ymttest.database.model.orderrisk.HighRiskSellerExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;

public interface HighRiskSellerMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table high_risk_seller
     *
     * @mbggenerated Mon Nov 23 18:33:32 CST 2020
     */
    @SelectProvider(type=HighRiskSellerSqlProvider.class, method="countByExample")
    int countByExample(HighRiskSellerExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table high_risk_seller
     *
     * @mbggenerated Mon Nov 23 18:33:32 CST 2020
     */
    @DeleteProvider(type=HighRiskSellerSqlProvider.class, method="deleteByExample")
    int deleteByExample(HighRiskSellerExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table high_risk_seller
     *
     * @mbggenerated Mon Nov 23 18:33:32 CST 2020
     */
    @Delete({
        "delete from high_risk_seller",
        "where id = #{id,jdbcType=BIGINT}"
    })
    int deleteByPrimaryKey(Long id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table high_risk_seller
     *
     * @mbggenerated Mon Nov 23 18:33:32 CST 2020
     */
    @Insert({
        "insert into high_risk_seller (id, sellerId, ",
        "penalty_record, activity_blacklist, ",
        "suspected_sale, abuse_user, ",
        "poor_service, poor_deposit, ",
        "deposit, complaint_rate, ",
        "bad_comment_rate, bad_transaction_rate, ",
        "data_effective_date, add_time)",
        "values (#{id,jdbcType=BIGINT}, #{sellerId,jdbcType=BIGINT}, ",
        "#{penalty_record,jdbcType=VARCHAR}, #{activity_blacklist,jdbcType=VARCHAR}, ",
        "#{suspected_sale,jdbcType=TINYINT}, #{abuse_user,jdbcType=TINYINT}, ",
        "#{poor_service,jdbcType=TINYINT}, #{poor_deposit,jdbcType=TINYINT}, ",
        "#{deposit,jdbcType=VARCHAR}, #{complaint_rate,jdbcType=DECIMAL}, ",
        "#{bad_comment_rate,jdbcType=DECIMAL}, #{bad_transaction_rate,jdbcType=DECIMAL}, ",
        "#{data_effective_date,jdbcType=VARCHAR}, #{add_time,jdbcType=TIMESTAMP})"
    })
    int insert(HighRiskSeller record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table high_risk_seller
     *
     * @mbggenerated Mon Nov 23 18:33:32 CST 2020
     */
    @InsertProvider(type=HighRiskSellerSqlProvider.class, method="insertSelective")
    int insertSelective(HighRiskSeller record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table high_risk_seller
     *
     * @mbggenerated Mon Nov 23 18:33:32 CST 2020
     */
    @SelectProvider(type=HighRiskSellerSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
        @Result(column="sellerId", property="sellerId", jdbcType=JdbcType.BIGINT),
        @Result(column="penalty_record", property="penalty_record", jdbcType=JdbcType.VARCHAR),
        @Result(column="activity_blacklist", property="activity_blacklist", jdbcType=JdbcType.VARCHAR),
        @Result(column="suspected_sale", property="suspected_sale", jdbcType=JdbcType.TINYINT),
        @Result(column="abuse_user", property="abuse_user", jdbcType=JdbcType.TINYINT),
        @Result(column="poor_service", property="poor_service", jdbcType=JdbcType.TINYINT),
        @Result(column="poor_deposit", property="poor_deposit", jdbcType=JdbcType.TINYINT),
        @Result(column="deposit", property="deposit", jdbcType=JdbcType.VARCHAR),
        @Result(column="complaint_rate", property="complaint_rate", jdbcType=JdbcType.DECIMAL),
        @Result(column="bad_comment_rate", property="bad_comment_rate", jdbcType=JdbcType.DECIMAL),
        @Result(column="bad_transaction_rate", property="bad_transaction_rate", jdbcType=JdbcType.DECIMAL),
        @Result(column="data_effective_date", property="data_effective_date", jdbcType=JdbcType.VARCHAR),
        @Result(column="add_time", property="add_time", jdbcType=JdbcType.TIMESTAMP)
    })
    List<HighRiskSeller> selectByExample(HighRiskSellerExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table high_risk_seller
     *
     * @mbggenerated Mon Nov 23 18:33:32 CST 2020
     */
    @Select({
        "select",
        "id, sellerId, penalty_record, activity_blacklist, suspected_sale, abuse_user, ",
        "poor_service, poor_deposit, deposit, complaint_rate, bad_comment_rate, bad_transaction_rate, ",
        "data_effective_date, add_time",
        "from high_risk_seller",
        "where id = #{id,jdbcType=BIGINT}"
    })
    @Results({
        @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
        @Result(column="sellerId", property="sellerId", jdbcType=JdbcType.BIGINT),
        @Result(column="penalty_record", property="penalty_record", jdbcType=JdbcType.VARCHAR),
        @Result(column="activity_blacklist", property="activity_blacklist", jdbcType=JdbcType.VARCHAR),
        @Result(column="suspected_sale", property="suspected_sale", jdbcType=JdbcType.TINYINT),
        @Result(column="abuse_user", property="abuse_user", jdbcType=JdbcType.TINYINT),
        @Result(column="poor_service", property="poor_service", jdbcType=JdbcType.TINYINT),
        @Result(column="poor_deposit", property="poor_deposit", jdbcType=JdbcType.TINYINT),
        @Result(column="deposit", property="deposit", jdbcType=JdbcType.VARCHAR),
        @Result(column="complaint_rate", property="complaint_rate", jdbcType=JdbcType.DECIMAL),
        @Result(column="bad_comment_rate", property="bad_comment_rate", jdbcType=JdbcType.DECIMAL),
        @Result(column="bad_transaction_rate", property="bad_transaction_rate", jdbcType=JdbcType.DECIMAL),
        @Result(column="data_effective_date", property="data_effective_date", jdbcType=JdbcType.VARCHAR),
        @Result(column="add_time", property="add_time", jdbcType=JdbcType.TIMESTAMP)
    })
    HighRiskSeller selectByPrimaryKey(Long id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table high_risk_seller
     *
     * @mbggenerated Mon Nov 23 18:33:32 CST 2020
     */
    @UpdateProvider(type=HighRiskSellerSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") HighRiskSeller record, @Param("example") HighRiskSellerExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table high_risk_seller
     *
     * @mbggenerated Mon Nov 23 18:33:32 CST 2020
     */
    @UpdateProvider(type=HighRiskSellerSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") HighRiskSeller record, @Param("example") HighRiskSellerExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table high_risk_seller
     *
     * @mbggenerated Mon Nov 23 18:33:32 CST 2020
     */
    @UpdateProvider(type=HighRiskSellerSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(HighRiskSeller record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table high_risk_seller
     *
     * @mbggenerated Mon Nov 23 18:33:32 CST 2020
     */
    @Update({
        "update high_risk_seller",
        "set sellerId = #{sellerId,jdbcType=BIGINT},",
          "penalty_record = #{penalty_record,jdbcType=VARCHAR},",
          "activity_blacklist = #{activity_blacklist,jdbcType=VARCHAR},",
          "suspected_sale = #{suspected_sale,jdbcType=TINYINT},",
          "abuse_user = #{abuse_user,jdbcType=TINYINT},",
          "poor_service = #{poor_service,jdbcType=TINYINT},",
          "poor_deposit = #{poor_deposit,jdbcType=TINYINT},",
          "deposit = #{deposit,jdbcType=VARCHAR},",
          "complaint_rate = #{complaint_rate,jdbcType=DECIMAL},",
          "bad_comment_rate = #{bad_comment_rate,jdbcType=DECIMAL},",
          "bad_transaction_rate = #{bad_transaction_rate,jdbcType=DECIMAL},",
          "data_effective_date = #{data_effective_date,jdbcType=VARCHAR},",
          "add_time = #{add_time,jdbcType=TIMESTAMP}",
        "where id = #{id,jdbcType=BIGINT}"
    })
    int updateByPrimaryKey(HighRiskSeller record);
}